package com.loongson;


import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

public class OpenstackScheduledExecutor implements Runnable{

	private static Logger logger = LoggerFactory.getLogger(OpenstackScheduledExecutor.class);
	private String conf = null;
	private String vmNames = null;
			
	public OpenstackScheduledExecutor(String conf, String vmNames) {
		super();
		this.conf = conf;
		this.vmNames = vmNames;
	}

	public void run() {
		logger.info("Auto delete and start task start");
		OpenstackUtil ou = new OpenstackUtil();
		ou.init(this.conf);
		ou.deleteFromUser();
		ou.createAndSaveRedis(this.vmNames);

	}

	public String getConf() {
		return conf;
	}

	public void setConf(String conf) {
		this.conf = conf;
	}

	public String getVmNames() {
		return vmNames;
	}

	public void setVmNames(String vmNames) {
		this.vmNames = vmNames;
	}

}